package factory

import "go_keep_learning/jtthink/design_patterns/easy_factory/model"

const (
	AdminUserType = iota
	FrontUserType
)

type CreateUserType int

//简单工厂模式
func CreateFactory(t CreateUserType) model.CreUserFunc {
	switch t {
	case AdminUserType:
		return model.NewAdminUser()
	case FrontUserType:
		return model.NewFrontUser()
	default:
		return model.NewFrontUser()
	}
}
